<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>axios</title>
</head>

<body>
    <script src="https://cdn.bootcss.com/axios/0.19.2/axios.min.js"></script>
    <script type="text/javascript">
        axios({
            method: 'post',
            url: '/api/chat',
            data: {
                firstName: 'Fred',
                lastName: 'Flintstone'
            }
        });
    </script>
</body>

</html>